package com.ordersys.cloud.mapper;

import com.ordersys.cloud.entity.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper {
    //增加
    public int addProduct(Product product);
    //删
    public int deleteProduct(Integer id);
    //改
    public int updateProduct(Product product);

    //查所有
    public List<Product> getProductAllList();
    //通过id查
    public Product getProductById(Integer id);

    //减库存
    public Integer reduceStock(@Param("productId") Integer productId, @Param("quantity")Integer quantity);


}
